package com.zzk.protect.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * 
 * @TableName disease
 */
@TableName(value ="disease")
public class Disease {
    /**
     * Primary key ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * disease code
     */
    @TableField(value = "code")
    private String code;

    /**
     * disease name
     */
    @TableField(value = "name")
    private String name;

    /**
     * ICD code
     */
    @TableField(value = "icd_code")
    private String icdCode;

    /**
     * disease category
     */
    @TableField(value = "category_id")
    private Integer categoryId;

    /**
     * Delete flag
     */
    @TableField(value = "is_deleted")
    private Integer isDeleted;

    /**
     * Primary key ID
     */
    public Integer getId() {
        return id;
    }

    /**
     * Primary key ID
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * disease code
     */
    public String getCode() {
        return code;
    }

    /**
     * disease code
     */
    public void setCode(String code) {
        this.code = code;
    }

    /**
     * disease name
     */
    public String getName() {
        return name;
    }

    /**
     * disease name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * ICD code
     */
    public String getIcdCode() {
        return icdCode;
    }

    /**
     * ICD code
     */
    public void setIcdCode(String icdCode) {
        this.icdCode = icdCode;
    }

    /**
     * disease category
     */
    public Integer getCategoryId() {
        return categoryId;
    }

    /**
     * disease category
     */
    public void setCategoryId(Integer categoryId) {
        this.categoryId = categoryId;
    }

    /**
     * Delete flag
     */
    public Integer getIsDeleted() {
        return isDeleted;
    }

    /**
     * Delete flag
     */
    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Disease other = (Disease) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getIcdCode() == null ? other.getIcdCode() == null : this.getIcdCode().equals(other.getIcdCode()))
            && (this.getCategoryId() == null ? other.getCategoryId() == null : this.getCategoryId().equals(other.getCategoryId()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getIcdCode() == null) ? 0 : getIcdCode().hashCode());
        result = prime * result + ((getCategoryId() == null) ? 0 : getCategoryId().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", code=").append(code);
        sb.append(", name=").append(name);
        sb.append(", icdCode=").append(icdCode);
        sb.append(", categoryId=").append(categoryId);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append("]");
        return sb.toString();
    }
}